cmake_minimum_required(VERSION 3.20.0)

project(cuda_sys LANGUAGES CXX CUDA)

# find_library(GTest REQUIRED gtest)
find_package(GTest REQUIRED)

include_directories(${GTEST_INCLUDE_DIRS})
SET(CUDA_HOME /usr/local/cuda)

include_directories(${CUDA_HOME}/include)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)

add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src)

add_executable(cuda_sys_unittest
    ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/test/reduce_ut.cpp
)
target_link_libraries(cuda_sys_unittest
    ${GTEST_LIBRARIES}
    cuda_fast
    pthread
)